package org.raymond.iworks.study.app;

import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;
import org.raymond.iworks.repository.repository.TSysLogRepository;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;


@Slf4j
@SpringBootTest
public class MockTest {

    @MockBean
    private TSysLogRepository tSysLogRepository;

    @Test
    public void test(){
        Mockito.when(tSysLogRepository.count()).thenReturn(1000l);
        long count = tSysLogRepository.count();
        log.info("count: {}", count);
    }
}
